package com.chenbei.common.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

@EqualsAndHashCode(callSuper = true)
@Schema(description = "省市区")
@Data
@TableName("areas")
public class Areas extends BaseEntity {

    @Schema(description = "主键ID")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    @Schema(description = "父ID")
    private Long pid;

    @Schema(description = "名称")
    @TableField("name")
    private String name;

    @Schema(description = "城市CODE")
    @TableField("ad_code")
    private String adCode;

    @Schema(description = "经度")
    private String lng;

    @Schema(description = "纬度")
    private String lat;

    @Schema(description = "级别(1:省份|2:城市|3:区县)")
    private Integer level;

    @Schema(description = "排序")
    private Integer sort;
}
